package com.ai.controller.made;


import com.ai.annotation.EnterPathParamLog;
import com.ai.common.CommonResponse;
import com.ai.entity.cameraFunctions.regions.RegionsBO;
import com.ai.model.made.CgLabelDto;
import com.ai.service.made.IImageLabelService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 图片标注
 *
 * @author jiaok
 * @since 2025-01-06
 */
@RestController
@RequestMapping("/image-label")
public class ImageLabelController {

    @Resource
    private IImageLabelService iImageLabelService;

    @ApiOperation("图表标注")
    @PostMapping("labeling")
    @EnterPathParamLog
    public CommonResponse labeling(@RequestBody CgLabelDto cgLabelDto) {
        return iImageLabelService.labeling(cgLabelDto);
    }

    @ApiOperation("获取指定图片的标注信息")
    @PostMapping("getLabelInfo")
    @EnterPathParamLog
    public CommonResponse getLabelInfo(@RequestBody CgLabelDto cgLabelDto) {
        return iImageLabelService.getLabelInfo(cgLabelDto);
    }

}
